package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Role;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface UserDao {
    public User findByUsername(String username);
    public User getMenuMap(String username);
    void deleteById(Integer id);

    void deleteBeforeAssociation(Integer userAndRoleId);

    List<Integer> findUserAndRoleId(Integer id);

    List<User> findAllUser();


    List<Role> findRole();

    User findById(Integer id);

    void deleteBeforeAssociation1(Integer id);

    void update(User user);

    Page<User> findPage(String queryString);

    void save(User user);

    void setUserAndRole(@Param("id") Integer id,@Param("roleId") Integer roleId);
    String  findUserPassword(String username);
    void updatePassword(@Param("username") String username, @Param("password") String password, @Param("MD5Password")String MD5Password);
}
